package com.jhgsys.internal.accident.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 *  Entity
 *
 * @author admin
 * @date 2024-08-07 16:43:01
 */
@Data
@TableName("accident_report")
public class AccidentReport implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "report_id", type = IdType.ASSIGN_UUID)
    private String reportId;

    /**
     * 公司Id
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 事故编号
     */
    @TableField("accident_no")
    private String accidentNo;

    /**
     * 事故标题
     */
    @TableField("accident_title")
    private String accidentTitle;

    /**
     * 发生时间
     */
    @TableField("accident_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date accidentDate;

    /**
     * 发生地点
     */
    @TableField("accident_place")
    private String accidentPlace;

    /**
     * 事故类型
     */
    @TableField("accident_type")
    private String accidentType;

    /**
     * 事故等级
     */
    @TableField("accident_level")
    @NotBlank(message = "{required}")
    private String accidentLevel;

    /**
     * 船舶类型
     */
    @TableField("accident_ship_type")
    private String accidentShipType;

    /**
     * 初步损失
     */
    @TableField("preliminarily_damage")
    private String preliminarilyDamage;

    /**
     * 初步描述
     */
    @TableField("preliminarily_descript")
    private String preliminarilyDescript;

    /** 是否接受援助;0：否 1：是 */
    @TableField("accept_assist_flg")
    private String acceptAssistFlg;

    /**
     * 调查状态;1:待分配 2：已分配待调查 3：已退回待审核 4：已调查待审核 5：调查完成
     */
    @TableField("survey_status")
    private String surveyStatus;

    /**
     * 是否报告主管部门;0：否 1：是
     */
    @TableField("notice_dept_flg")
    private String noticeDeptFlg;

    /**
     * 报告部门名称
     */
    @TableField("notice_dept_name")
    private String noticeDeptName;

    /**
     * 上报主管部门时间
     */
    @TableField("notice_dept_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date noticeDeptDate;

    /**
     * 事故上报状态;1：待提交 2：进行中 3：已完成
     */
    @TableField("status")
    private String status;

    /**
     * 调查期限
     */
    @TableField("survey_deadline")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date surveyDeadline;

    /**
     * 调查指派备注
     */
    @TableField("survey_remark")
    private String surveyRemark;

    /** 项目Id */
    @TableField("project_id")
    private String projectId;

    /** 项目名称 */
    @TableField("project_name")
    private String projectName;

    /** 区域位置Id */
    @TableField("accident_area_id")
    private String accidentAreaId ;

    /**
     * 区域位置
     */
    @TableField("accident_area_name")
    private String accidentAreaName;

    /**
     * 事故详细经过
     */
    @TableField("accident_elapse")
    private String accidentElapse;

    /**
     * 应急处理情况
     */
    @TableField("emergency_overview")
    @Size(max = 800, message = "{noMoreThan}")
    private String emergencyOverview;

    /**
     * 应急反应级别;SAFETY_ACCIDENT_EMERGENCY_LEVEL
     */
    @TableField("emergency_level")
    @Size(max = 150, message = "{noMoreThan}")
    private String emergencyLevel;

    /**
     * 损失工时（总）
     */
    @TableField("total_loss_hours")
    private Integer totalLossHours;

    /**
     * 环境影响
     */
    @TableField("environment_effect")
    @Size(max = 800, message = "{noMoreThan}")
    private String environmentEffect;

    /**
     * 死亡人数
     */
    @TableField("death_toll")
    private Integer deathToll;

    /**
     * 重伤人数
     */
    @TableField("severe_injury_toll")
    private Integer severeInjuryToll;

    /**
     * 轻伤人数
     */
    @TableField("slight_injury_toll")
    private Integer slightInjuryToll;

    /**
     * 失踪人数
     */
    @TableField("missing_toll")
    private Integer missingToll;

    /**
     * 经济损失（总）
     */
    @TableField("total_loss")
    @Size(max = 255, message = "{noMoreThan}")
    private String totalLoss;

    /**
     * 直接经济损失
     */
    @TableField("economy_loss")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal economyLoss;

    /**
     * 间接经济损失
     */
    @TableField("indirect_loss")
    private BigDecimal indirectLoss;

    /**
     * 事故原因;SAFETY_ACCIDENT_REASON
     */
    @TableField("accident_reason")
    @Size(max = 150, message = "{noMoreThan}")
    private String accidentReason;

    /**
     * 直接原因;人的不安全行为、物的不安全状态和环境因素
     */
    @TableField("direct_reason")
    @Size(max = 255, message = "{noMoreThan}")
    private String directReason;

    /**
     * 直接原因补充
     */
    @TableField("direct_reason_remark")
    @Size(max = 255, message = "{noMoreThan}")
    private String directReasonRemark;

    /**
     * 间接原因;技术或设计失误、管理缺陷
     */
    @TableField("indirection_reason")
    @Size(max = 255, message = "{noMoreThan}")
    private String indirectionReason;

    /**
     * 间接原因补充
     */
    @TableField("indirection_reason_remark")
    @Size(max = 255, message = "{noMoreThan}")
    private String indirectionReasonRemark;

    /**
     * 根本原因
     */
    @TableField("root_reason")
    @Size(max = 150, message = "{noMoreThan}")
    private String rootReason;

    /**
     * 根本原因补充
     */
    @TableField("root_reason_remark")
    @Size(max = 800, message = "{noMoreThan}")
    private String rootReasonRemark;

    /**
     * 事故分析及处理建议
     */
    @TableField("accident_analysis")
    @Size(max = 800, message = "{noMoreThan}")
    private String accidentAnalysis;

    /**
     * 责任人Id
     */
    @TableField("obligation_user_id")
    @Size(max = 32, message = "{noMoreThan}")
    private String obligationUserId;

    /**
     * 责任人工号
     */
    @TableField("obligation_user_no")
    @Size(max = 64, message = "{noMoreThan}")
    private String obligationUserNo;

    /**
     * 责任人姓名
     */
    @TableField("obligation_real_name")
    @Size(max = 150, message = "{noMoreThan}")
    private String obligationRealName;

    /**
     * 责任人部门Id
     */
    @TableField("obligation_dept_id")
    @Size(max = 32, message = "{noMoreThan}")
    private String obligationDeptId;

    /**
     * 责任人部门
     */
    @TableField("obligation_dept_name")
    @Size(max = 150, message = "{noMoreThan}")
    private String obligationDeptName;

    /**
     * 责任人岗位Id
     */
    @TableField("obligation_post_id")
    @Size(max = 255, message = "{noMoreThan}")
    private String obligationPostId;

    /**
     * 责任人岗位
     */
    @TableField("obligation_post_name")
    @Size(max = 255, message = "{noMoreThan}")
    private String obligationPostName;

    /**
     * 责任人追究
     */
    @TableField("obligation_dispose_condition")
    @Size(max = 800, message = "{noMoreThan}")
    private String obligationDisposeCondition;

    /**
     * 事故概况
     */
    @TableField("accident_overview")
    private String accidentOverview;

    /** 事故类别;SAFETY_ACCIDENT_CATEGORY */
    @TableField("accident_category")
    private String accidentCategory;

    /** 具体位置 */
    @TableField("detail_place")
    private String detailPlace;

    /** 事故性质;SAFETY_ACCIDENT_CATEGORY */
    @TableField("accident_nature")
    private String accidentNature;

    /** 违反保命规则 */
    @TableField("violation_survival_rules")
    private String violationSurvivalRules;

    /**
     * 责任比例
     */
    @TableField("obligation_ratio")
    private Double obligationRatio;

    /**
     * 责任认定
     */
    @TableField("obligation_cognizance")
    private String obligationCognizance;

    /**
     * 调查审核人Id
     */
    @TableField("survey_audit_user_id")
    private String surveyAuditUserId;

    /**
     * 调查审核人姓名
     */
    @TableField("survey_audit_real_name")
    private String surveyAuditRealName;

    /**
     * 调查审核时间
     */
    @TableField("survey_audit_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date surveyAuditDate;

    /**
     * 调查审核备注
     */
    @TableField("survey_audit_remark")
    private String surveyAuditRemark;

    /**
     * 转发警示教训;0：否 1：是
     */
    @TableField("cautionary_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String cautionaryFlg;

    /**
     * 上报重工;0：否 1：是
     */
    @TableField("notice_chic")
    private String noticeChic;

    /**
     * 上报重工时间
     */
    @TableField("notice_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date noticeDate;

    /**
     * 流程申请Id
     */
    @TableField("workflow_apply_id")
    private String workflowApplyId;

    /**
     * 创建人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @ExcelField("删除标记")
    private String deletedFlg;

}